<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>按钮</button>
   <ul>
        <li>问天</li>
        <li>问地</li>
        <li>问星河</li>
   </ul>
</body>
</html>
<script>
    var but=document.querySelector("button")
    var ul=document.querySelector("ul")
    var a=0;
    but.onclick=function(){
        if(a==0){
            ul.style.color="#001bee"
            ul.style.textDecoration= 'underline'
            ul.style.listStyle='none'
            a=1
        }else{
            ul.style.color=""
            ul.style.textDecoration= ''
            ul.style.listStyle=''
            a=0
        }
    }
</script>